home *** CD-ROM | disk | FTP | other *** search
/ Atari Forever 3 / Atari Forever 3 / Atari Forever 3.iso / PD_NEU / INTERNET / CAB / DOC / PROGRAMI / CAB_PROT.ENG next >
Encoding:
Text File  |  1996-09-12  |  6.0 KB  |  267 lines

  1.  
  2. The CAB-protocol
  3. ================
  4.  
  5. The CAB-protocol consists of a number of AES-messages, which can be
  6. used by GEM programs to transfer specific operations to CAB. CAB takes
  7. responsibility for coordinating these operations.
  8.  
  9. A possible application:
  10. If information or updates are available on the Internet the
  11. CAB-protocol could be used to access this information. CAB would
  12. download and display the data.
  13.  
  14.  
  15. Message descriptions
  16. ====================
  17.  
  18. CAB_HELLO ($CAB8) (message from CAB)
  19. -----------------
  20. After starting, CAB sends the following message to all running
  21. programs:
  22.  
  23. msg[0] = $CAB8
  24. msg[1] = CAB ID
  25. msg[2] = 0
  26. msg[3] = Version of the CAB-protocol (where, e.g. $0100 = v1.00)
  27. msg[4] = Bit vector containing the CAB (CAB.OVL) supported Internet
  28.          protocols:
  29.           Bit 0: HTTP
  30.           Bit 1: FTP
  31.           Bit 2: GOPHER
  32.           Bit 3: WAIS
  33.           Bit 4: MAILTO
  34.           Bit 5: NNTP
  35.           Bit 6: TELNET
  36.           Bit 7-15: 0 (reserved)
  37. msg[5] = Bit vector containing the CAB supported messages of the
  38.          CAB-protocol:
  39.           Bit 0: CAB_VIEW
  40.           Bit 1: CAB_MAIL, CAB_MAILSEND
  41.           Bit 2: CAB_REQUESTSTATUS, CAB_RELEASESTATUS, CAB_STATUS,
  42.                  CAB_EXIT
  43.           Bit 3-15: 0 (reserved)
  44. msg[6] = 0
  45. msg[7] = 0
  46.  
  47.  
  48.  
  49. CAB_SUPPORT ($CABB) (message to CAB)
  50. -------------------
  51. If CAB receives this message it replies by sending a CAB_HELLO message.
  52. If no CAB_HELLO message is received the CAB version must be pre
  53. CAB-protocol.
  54. Any programs which are interested in the information CAB_HELLO supplies
  55. should, after starting, send a CAB_SUPPORT message to CAB. If CAB is
  56. subsequently started it automaticallys send a CAB_HELLO message to the
  57. program.
  58.  
  59. msg[0] = $CABB
  60. msg[1] = ID of the PRGs
  61. msg[2] = 0
  62. msg[3] = 0
  63. msg[4] = 0
  64. msg[5] = 0
  65. msg[6] = 0
  66. msg[7] = 0
  67.  
  68.  
  69.  
  70. CAB_VIEW ($CAB3) (message to CAB)
  71. ----------------
  72. Similar to VA_START but instead of filename/s URLs are passed and CAB
  73. displays the file.
  74.  
  75. msg[0] = $CAB3
  76. msg[1] = ID of the PRGs
  77. msg[2] = 0
  78. msg[3] = \ Pointer to the URL
  79. msg[4] = /
  80. msg[5] = 1 = CAB displays URL in a new window
  81.          0 = CAB displays URL in the top CAB window
  82. msg[6] = 0
  83. msg[7] = 0
  84.  
  85.  
  86.  
  87. CAB_REQUESTSTATUS ($CAB5) (message to CAB)
  88. -------------------------
  89. Can be sent CAB to determine whether CAB is currently on-line or
  90. off-line. CAB sends the CAB_STATUS message as a reply after every
  91. change in the on/off-line status.
  92.  
  93. msg[0] = $CAB5
  94. msg[1] = ID of the PRGs
  95. msg[2] = 0
  96. msg[3] = 0
  97. msg[4] = 0
  98. msg[5] = 0
  99. msg[6] = 0
  100. msg[7] = 0
  101.  
  102.  
  103.  
  104. CAB_RELEASESTATUS ($CAB7) (message to CAB)
  105. -------------------------
  106. A program should send this message to CAB if it's no longer interested
  107. in receiving the CAB on/off-line status it requested via the
  108. CAB_REQUESTSTATUS message (e.g. if the program is exited).
  109.  
  110. msg[0] = $CAB7
  111. msg[1] = ID of the PRGs
  112. msg[2] = 0
  113. msg[3] = 0
  114. msg[4] = 0
  115. msg[5] = 0
  116. msg[6] = 0
  117. msg[7] = 0
  118.  
  119.  
  120.  
  121. CAB_STATUS ($CAB6) (message from CAB)
  122. ------------------
  123. CAB sends this message to all programs which have requested to be kept
  124. informed of the CAB on/off-line status via the CAB_REQUESTSTATUS
  125. message.
  126.  
  127. msg[0] = $CAB6
  128. msg[1] = CAB ID
  129. msg[2] = 0
  130. msg[3] = 1 = CAB on-line
  131.          0 = CAB off-line
  132. msg[4] = 0
  133. msg[5] = 0
  134. msg[6] = 0
  135. msg[7] = 0
  136.  
  137.  
  138.  
  139. CAB_EXIT ($CAB1) (message from CAB)
  140. ----------------
  141. CAB sends this message to all programs which have requested to be kept
  142. informed of the CAB on/off-line status, via the CAB_REQUESTSTATUS
  143. message as CAB is exited. Beforehand CAB sends a CAB_STATUS message to
  144. all programs reporting CAB is in the off-line state.
  145.  
  146. msg[0] = $CAB1
  147. msg[1] = CAB ID
  148. msg[2] = 0
  149. msg[3] = 0
  150. msg[4] = 0
  151. msg[5] = 0
  152. msg[6] = 0
  153. msg[7] = 0
  154.  
  155.  
  156.  
  157. CAB_MAIL ($CAB9) (message to CAB)
  158. ----------------
  159. Can be sent to CAB in order to send mail.
  160.  
  161. msg[0] = $CAB9
  162. msg[1] = ID of the PRGs
  163. msg[2] = 0
  164.  
  165. msg[3] = \ Pointer to the URL. A Subject line can be appended to the
  166. msg[4] = / URL using a question mark as a separator.
  167.  
  168. msg[5] = \ Pointer to a file which contains the mail message or null
  169. msg[6] = / in which case CAB opens an editor to enter the message.
  170.  
  171. msg[7] = Bit vector:
  172.           Bit 0: 0 = Send mail message immediately
  173.                  1 = Mail message from the user can be handled/edited
  174.                      via CAB.
  175.           Bit 1: File should be deleted by CAB after processing.
  176.           Bil 2-15: reserved (0)
  177.  
  178.  
  179. CAB_MAILSENT ($CABA) (message from CAB)
  180. --------------------
  181. CAB sends this message in reply to a CAB_MAIL message to inform the
  182. program whether the mail was sent along with a status indicator.
  183.  
  184. msg[0] = $CABA
  185. msg[1] = CAB ID
  186. msg[2] = 0
  187. msg[3] = 1 = Mail sent without error/s)
  188.          0 = Error encounter, msg [4] indicates nature of error
  189. msg[4] = Returns an error number, if msg[3] = 0
  190.        = 0: No URL given.
  191.        = 1: Off-line, net connection disturbed, server not accessible
  192.        = 2: User has aborted mail send action (e.g. where mail is
  193.             handled via CAB the user has the opportunity to abort the
  194.             action
  195.        = 3: GEMDOS error/s on accessing the mail message file
  196.        = 4: Editor to handle mail message could not be found
  197. msg[5] = 0
  198. msg[6] = 0
  199. msg[7] = 0
  200.  
  201.  
  202.  
  203.  
  204. Special messages for 'Cache-Tools'
  205. ==================================
  206.  
  207. CAB_CCHANGED ($CAB0) (message to/from CAB)
  208. --------------------
  209. The cache (i.e. CACHE.CAB) was changed and should be re-read.
  210.  
  211. msg[0] = $CAB0
  212. msg[1] = CAB ID/ID of the PRGs
  213. msg[2] = 0
  214. msg[3] = 0
  215. msg[4] = 0
  216. msg[5] = 0
  217. msg[6] = 0
  218. msg[7] = 0
  219.  
  220.  
  221.  
  222. CAB_EXIT ($CAB1) (message to/from CAB)
  223. ----------------
  224. CAB or the Cache-Tool exits (each PRG should inform the other on
  225. exiting).
  226.  
  227. msg[0] = $CAB1
  228. msg[1] = CAB ID/ID of the PRGs
  229. msg[2] = 0
  230. msg[3] = 0
  231. msg[4] = 0
  232. msg[5] = 0
  233. msg[6] = 0
  234. msg[7] = 0
  235.  
  236.  
  237.  
  238. CAB_PATH ($CAB2) (message from CAB)
  239. ----------------
  240. The local HTML folders and/or the Cache folder have been changed. For
  241. more detailed information refer to the Cache-Tools documentation.
  242.  
  243. msg[0] = $CAB2
  244. msg[1] = CAB ID
  245. msg[2] = 0
  246. msg[3] = 0
  247. msg[4] = 0
  248. msg[5] = 0
  249. msg[6] = 0
  250. msg[7] = 0
  251.  
  252.  
  253.  
  254. CAB_TERM ($CAB4) (message from CAB)
  255. ----------------
  256. The Cache-Tool should exit.
  257.  
  258. msg[0] = $CAB4
  259. msg[1] = CAB ID
  260. msg[2] = 0
  261. msg[3] = 0
  262. msg[4] = 0
  263. msg[5] = 0
  264. msg[6] = 0
  265. msg[7] = 0
  266.  
  267.